package com.mes.biz.domain;

import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 产品对象 biz_product
 * @author hwg
 * @email hwg
 * @date 2023-04-02
 */
@Data
public class BizProduct extends BaseEntity<BizProduct>
{
    private static final long serialVersionUID = 1L;

    /** 产品大类 */
    @Excel(name = "产品大类",type = Excel.Type.EXPORT)
    @NotBlank(message = "产品大类不允许为空")
    @LogField
    @FieldRemark(name = "产品大类",field = "categoryId")
    private String categoryId;

    private String categoryName;

    /** 产品编号 */
    @Excel(name = "产品编号")
    @LogField
    @FieldRemark(name = "产品编号",field = "productCode")
    private String productCode;

    /** 助记码 */
    @Excel(name = "助记码",type = Excel.Type.EXPORT)
    @NotBlank(message = "助记码不允许为空")
    @LogField
    @FieldRemark(name = "助记码",field = "mnemonicCode")
    private String mnemonicCode;

    /** 默认仓库 */
    @Excel(name = "默认仓库",type = Excel.Type.EXPORT)
    @LogField
    @FieldRemark(name = "默认仓库",field = "warehouseId")
    private String warehouseId;

    private String warehouseName;

    /** 品牌 */
    @Excel(name = "品牌",type = Excel.Type.EXPORT)
    @LogField
    @FieldRemark(name = "品牌",field = "brand")
    private String brand;

    /** 颜色 */
    @Excel(name = "颜色",type = Excel.Type.EXPORT)
    @LogField
    @FieldRemark(name = "颜色",field = "color")
    private String color;

    /** 规格-长 */
    @LogField
    @FieldRemark(name = "规格-长",field = "specLength")
    private BigDecimal specLength;

    /** 规格-宽 */
    @LogField
    @FieldRemark(name = "规格-宽",field = "specWidth")
    private BigDecimal specWidth;

    /** 规格-高 */
    @LogField
    @FieldRemark(name = "规格-高",field = "specHeight")
    private BigDecimal specHeight;

    /** 型号 */
    @Excel(name = "型号")
    @LogField
    @FieldRemark(name = "型号",field = "model")
    private String model;

    /** 预警库存 */
    @LogField
    @FieldRemark(name = "预警库存",field = "warnStock")
    private Integer warnStock;

    /** 默认选项 */
    @LogField
    @FieldRemark(name = "规格",field = "spec")
    @Excel(name = "规格",type = Excel.Type.EXPORT)
    private String spec;


    /** 主单位 */
    @LogField
    @FieldRemark(name = "主单位",field = "unit")
    private String unit;

    /** 辅助单位1 */
    @LogField
    @FieldRemark(name = "辅助单位1",field = "assistUnitA")
    private String assistUnitA;

    /** 辅助单位2 */
    @LogField
    @FieldRemark(name = "辅助单位2",field = "assistUnitB")
    private String assistUnitB;


    /** 辅助单位1换算公式 */
    @LogField
    @FieldRemark(name = "辅助单位1换算公式",field = "convertRatioA")
    private BigDecimal convertRatioA;

    /** 辅助单位2换算公式 */
    @LogField
    @FieldRemark(name = "辅助单位2换算公式",field = "convertRatioB")
    private BigDecimal convertRatioB;

    /** 采购价 */
    @LogField
    @FieldRemark(name = "采购价",field = "purchasesPrice")
    private BigDecimal purchasesPrice;

    /** 辅助单位1采购价 */
    @LogField
    @FieldRemark(name = "辅助单位1采购价",field = "purchasesPriceA")
    private BigDecimal purchasesPriceA;

    /** 辅助单位2采购价 */
    @LogField
    @FieldRemark(name = "辅助单位2采购价",field = "purchasesPriceB")
    private BigDecimal purchasesPriceB;

    /** 销售价 */
    @LogField
    @FieldRemark(name = "销售价",field = "salePrice")
    private BigDecimal salePrice;

    /** 辅助单位1销售价 */
    @LogField
    @FieldRemark(name = "辅助单位1销售价",field = "salePriceA")
    private BigDecimal salePriceA;

    /** 辅助单位2销售价 */
    @LogField
    @FieldRemark(name = "辅助单位2销售价",field = "salePriceB")
    private BigDecimal salePriceB;

    /** 销售提成 */
    @LogField
    @FieldRemark(name = "销售提成",field = "saleDeduct")
    private BigDecimal saleDeduct;

    /** 辅助单位1销售提成 */
    @LogField
    @FieldRemark(name = "辅助单位1销售提成",field = "saleDeductA")
    private BigDecimal saleDeductA;
    /** 销售提成 */
    @LogField
    @FieldRemark(name = "辅助单位2销售提成",field = "saleDeductB")
    private BigDecimal saleDeductB;

    /** 安装提成 */
    @LogField
    @FieldRemark(name = "安装提成",field = "installDeduct")
    private BigDecimal installDeduct;

    /** 辅助单位1安装提成 */
    @LogField
    @FieldRemark(name = "辅助单位1安装提成",field = "installDeductA")
    private BigDecimal installDeductA;

    /** 安装提成 */
    @LogField
    @FieldRemark(name = "辅助单位2安装提成",field = "installDeductB")
    private BigDecimal installDeductB;

    /**
     *入库默认单位
     */
    private Integer defaultWarehousingUnit;

    /**
     * 出库默认单位
     */
    private Integer defaultOutboundUnit;

    /** 租户id */
    @FieldRemark(name = "租户id",field = "tenantId")
    private String tenantId;

    private String productId;

    private String parentId;

    /**
     * 树形节点类型1分类2产品
     */
    private String nodeType;

    private String nodeName;

    private String treeLeaf;

    private String excludeIds;

    private List<String> unitList = new ArrayList<>();

    @LogField
    @FieldRemark(name = "是否参与库存计算 0-否 1-是 ",field = "inventoryFlag")
    private String inventoryFlag;


    private String planName;

    private BigDecimal number;

}
